      SUBROUTINE QUIKVIS2B(IERR,IEND)
      IMPLICIT REAL*8 (A-H,O-Z)
C
C THIS ROUTINE IS PART OF THE QUIKVIS PROGRAM.  IT IS THE ROUTINE
C BY WHICH THE USER SETS DATE AND TIME INTERVAL FOR THE RUN.
C
C VARIABLE DIM TYPE I/O DESCRIPTION
C -------- --- ---- --- -----------
C
C IERR      1   I*4  O  ERROR RETURN FLAG
C                       =0, NO ERRORS.
C                       = OTHERWISE, ERROR PRESENT.
C
C IEND      1   I*4  O  END-FILE FLAG
C                       =0, NO END-FILE ENCOUNTERED DURING USER INPUT.
C                       =1, END-FILE ENCOUNTERED.
C
C***********************************************************************
C
C BY C PETRUZZO/GFSC/742.   2/86.
C       MODIFIED....
C
C***********************************************************************
C
      INCLUDE 'QUIKVIS.INC'
C
      LOGICAL OK
      CHARACTER*1 CH1
      CHARACTER*12 ERRMSG(2)/ 'REPROMPTING.', 'STOPPING.' /
C
      IERR = 0
      IEND = 1  ! WILL BE RESET TO ZERO IF READ IS DONE OK
C
C
      CALL QUIKVIS999(-1,R8DATA,I4DATA,L4DATA)
C
C
      WRITE(LUPROMPT,6756) '1'
 6756 FORMAT(//,
     *   ' ***************** USER GUIDE TABLE ',A,' *****************'/)
C
C
      TSTART = PAKTIM50(TSTART)
      DELTIME = DELTIME / 86400.D0
      NUMSAV = NUMTIMES
      OK = .FALSE.
      DO WHILE (.NOT.OK)
        NUMTIMES = NUMSAV
        CALL SET3SCAN('FIRST TIME AND INCREMENT(DAYS)',
     *          LUPROMPT,LUINPUT,
     *          TSTART,DELTIME,NUMTIMES,1.D0,IEND1)
        IF(IEND1.NE.0) THEN
          IEND = 1
          GO TO 9999
          END IF
        NUMTIMES = MAX(1,NUMTIMES)
        OK = NUMTIMES.LE.MAXTIMES
        IF(.NOT.OK) THEN
          INDEXERR = 1
          IF(.NOT.INTERACTIVE) INDEXERR = 2
          WRITE(LUPROMPT,5002) MAXTIMES,ERRMSG(INDEXERR)
          IF(.NOT.INTERACTIVE) THEN
            IERR = 1
            GO TO 9999
            END IF
          END IF
        END DO
      TSTART = SINCE50(TSTART)
      DELTIME = DELTIME * 86400.D0
C
      IEND = 0
C
 9999 CONTINUE
C
C WRAP UP. STORE DATA IN QUIKVIS999 ARRAYS FOR RETRIEVAL ELSEWHERE.
C
      CALL QUIKVIS999(1,R8DATA,I4DATA,L4DATA)
C
      RETURN
 5002 FORMAT(/,' >>> USER INPUT ERROR. TOO MANY TIMES. MAX=',I4,
     *          2X,A)
      END
